package java6681.lesson13;

public class ThrowDemo6681 {
    public static void main(String[] args) {
        Student stu = new Student();
        try {
            stu.setAge(10);
        } catch (AgeRangeException6681 ageRangeException6681) {
            System.out.println(ageRangeException6681);
            //ageRangeException6681.printStackTrace();
        }
        try {
            Student stu2 = new Student("张",40);
        } catch (AgeRangeException6681 ageRangeException6681) {
            System.out.println(ageRangeException6681.getMessage());
        }
    }
}
